package org.whale.springcloud.eureka.user.feign.service.impl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import org.whale.springcloud.eureka.common.entity.JsonResponse;
import org.whale.springcloud.eureka.user.feign.service.UserFeignService;

import java.util.Map;

@Component
public class UserFeignServiceFallback implements UserFeignService {

  private static final Logger logger = LoggerFactory.getLogger(UserFeignServiceFallback.class);

  @Override
  public JsonResponse<String> queryUserInfo(Map<String, String> params) {
    logger.info("feign error fall back");
    logger.info("request params : " + params.toString());
    return JsonResponse.fail("error fall back message", "error fall back result");
  }
}
